package com.huangpuweb.api.model;

import org.springframework.jdbc.core.RowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SysEventDataAllMapper implements RowMapper<SysEventDataAll> {
    @Override
    public SysEventDataAll mapRow(ResultSet rs, int rowNum) throws SQLException {
        SysEventDataAll sysEventDataAll=new SysEventDataAll();
        sysEventDataAll.setAddress(rs.getString("deviceName"));
        sysEventDataAll.setCameraid(rs.getString("deviceId"));
        sysEventDataAll.setOid("1");
        sysEventDataAll.setGuid(String.valueOf(rs.getInt("id")));
        sysEventDataAll.setLargetype("环卫市容");
        sysEventDataAll.setSmalltype("垃圾暴露");
        sysEventDataAll.setSubtype("垃圾暴露");
        sysEventDataAll.setDescribe("垃圾暴露");
        sysEventDataAll.setRequirement("整改、清除、行政处罚");
        sysEventDataAll.setLongshot(rs.getString("imageurl"));
        sysEventDataAll.setLongitude(rs.getString("lng"));
        sysEventDataAll.setLatitude(rs.getString("lat"));
        sysEventDataAll.setEventtime(rs.getString("eventTime"));
        return sysEventDataAll;
    }
}
